The following map shows all buildable area for attached and detached ADUs in East Palo Alto.
load("epa_parcels_furthest_adu.Rdata")
map <- epa_parcels_furthest_adu
leaflet() %>%
addTiles(group = "Default") %>%
addProviderTiles(providers$Esri.WorldImagery, group = "Satellite") %>%
addPolygons(
data = map %>% st_set_geometry("parcel_geometry") %>% dplyr::select(ADDRESS) %>% st_transform(4326),
fill = F,
color = "white",
weight = 0.5,
opacity = 0.5,
highlightOptions = highlightOptions(
weight = 2,
opacity = 1
),
label = ~ADDRESS,
group = "Parcels"
) %>%
addPolygons(
data = map %>% st_set_geometry("attached_buildable_area_geometry") %>% dplyr::select(max_attached_buildable_area) %>% st_transform(4326) %>% filter(!is.na(st_dimension(.))),
fillColor = "yellow",
stroke = F,
fillOpacity = 0.5,
highlightOptions = highlightOptions(
fillOpacity = 1
),
label = ~max_attached_buildable_area,
group = "Attached ADU Buildable Area"
) %>%
addPolygons(
data = map %>% st_set_geometry("detached_buildable_area_geometry") %>% dplyr::select(max_detached_buildable_area) %>% st_transform(4326) %>% filter(!is.na(st_dimension(.))),
fillColor = "green",
stroke = F,
fillOpacity = 0.5,
highlightOptions = highlightOptions(
fillOpacity = 1
),
label = ~max_detached_buildable_area,
group = "Detached ADU Buildable Area"
) %>%
addPolygons(
data = map %>% st_set_geometry("building_geometry") %>% dplyr::select(`GROSS BUILDING SQFT`) %>% st_transform(4326) %>% filter(!is.na(st_dimension(.))),
fillColor = "tan",
stroke = F,
fillOpacity = 0.5,
highlightOptions = highlightOptions(
fillOpacity = 1
),
label = ~`GROSS BUILDING SQFT`,
group = "Existing Building"
) %>%
addPolygons(
data = map %>% st_set_geometry("furthest_adu") %>% st_transform(4326) %>% filter(!is.na(st_dimension(.))),
fillColor = "blue",
stroke = F,
fillOpacity = 0.5,
highlightOptions = highlightOptions(
fillOpacity = 1
),
group = "Example Detached ADU"
) %>%
addLayersControl(
baseGroups = c("Default", "Satellite"),
overlayGroups = c("Parcels", "Existing Building", "Attached ADU<br>Buildable Area", "Detached ADU<br>Buildable Area", "Example<br>Detached ADU"),
options = layersControlOptions(collapsed = T)
)